package com.vf.admin.client.dao;

import com.vf.admin.common.db.BaseDao;
import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.entity.AppAuth;
import com.vf.admin.miaodong.entity.AppBanner;
import com.vf.admin.miaodong.entity.AppVoiceSignature;
import com.vf.admin.utils.StringEx;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Repository
public class AppVoiceSignatureDao extends BaseDao<AppVoiceSignature> {

    public List<AppVoiceSignature> list() {
        StringBuilder sbStr = new StringBuilder("select * from app_voice_signature");
        String sql = sbStr.toString();
        return this.queryList(sql, new ArrayList<>(), AppVoiceSignature.class);
    }

    public List<AppVoiceSignature> page(SplitPageBean splitPage) {
        ArrayList<Object> paramList = new ArrayList<>();
        StringBuilder sbStr = new StringBuilder("select * from app_voice_signature");


        String sql = sbStr.toString();
        return this.queryList(sql, paramList, AppVoiceSignature.class, splitPage);
    }

    public void del(Integer id) {
        if (id==null || id <= 0) {
            return;
        }
        String sql = "delete from app_voice_signature where id = ?";
        ArrayList<Object> paramList = new ArrayList<>();
        paramList.add(id);
        this.del(sql, paramList);
    }
}
